/* $Id:login.h jjs $ */
/*
   Copyright (C) 2007 by Jurjen Stellingwerff <jurjen@stwerff.xs4all.nl>
   Part of the Moros Project http://moros.sourceforge.net/

   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License.
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY.

   See the COPYING file for more details.
*/
#ifndef LOGIN_H
#define LOGIN_H

#include <gtkmm.h>
#include <libglademm.h>

/// Login window

class login : public Gtk::Dialog
{
public:
	login(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml> refGlade); ///< Window
	virtual ~login(); ///< Remove window data
	void message(std::string);

protected:
	Glib::RefPtr<Gnome::Glade::Xml> m_refGlade;
	virtual void clicked_cancel();
	virtual void clicked_login_do();
	Gtk::Button* login_cancel;
	Gtk::Button* login_do;
	Gtk::ComboBoxEntry* login_users;
	Gtk::Entry* login_password;
	Gtk::Label* result;

	Glib::RefPtr<Gtk::ListStore> store;
	struct ModelColumns : public Gtk::TreeModel::ColumnRecord {
    	Gtk::TreeModelColumn<Glib::ustring> id;
	   	ModelColumns() { add(id); }
	};
	const ModelColumns cols;
};

#endif //LOGIN_H
